package com.hello.settings.taxi;

import com.hello.DrunkoidSettingData;
import com.hello.R;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class TaxiChooser extends Activity{
	private DrunkoidSettingData settings = DrunkoidSettingData.getInstance();
	private EditText taxiPhoneField;
	
	public void onCreate(Bundle savedInstanceState) {
		
		
		super.onCreate(savedInstanceState);
		setContentView(R.layout.settings_taxiscreen);
		taxiPhoneField = (EditText) findViewById(R.id.settings_taxi_phone);
		taxiPhoneField.setText(settings.getTaxiPhone());
		
		Button cancelBtn = (Button)findViewById(R.id.btn_settings_taxi_cancel);
		cancelBtn.setOnClickListener(new OnClickListener() {
			public void onClick(View view) {
				finish();
			}
		});
		Button saveBtn = (Button)findViewById(R.id.btn_settings_taxi_save);
		saveBtn.setOnClickListener(new OnClickListener() {
			public void onClick(View view) {
				String taxiPhone = taxiPhoneField.getText().toString();
				settings.setTaxiPhone(taxiPhone);
				finish();
			}
		});
	}
}
